#!/usr/bin/env python2
from re import match

m_dict = { "QF": "QUARTER-FINALS", "SF": "SEMI-FINALS", "F": "FINALS" }

def GetHumanReadableName(roundName):
    if match(r'PRELIM[0-9]+/[0-9]+$', roundName) != None:
        return "PRELIMINARY ROUND " + roundName[6:].split("/")[0] + " OF " + roundName.split("/")[1]
    if match(r'ROUNDOF[0-9]+$', roundName) != None:
        return "ROUND OF " + roundName[7:]
    return m_dict[roundName]
